#include <stdio.h>

struct student
{
	char sno[8];
	char name[20];
	char sex;
	int age;
	double score;
};

struct student max(struct student t1, struct student t2);

int main(void)
{	
	struct student s1 = {"2015001", "LiMing", 'M', 18, 92.5};
	struct student s2 = {"2015002", "WangFang", 'F', 18, 95.5};
	struct student s;
	
	s = max(s1, s2);
	printf("sno: %s\n", s.sno);
	printf("name: %s\n", s.name);
	printf("sex: %c\n", s.sex);
	printf("age: %d\n", s.age);
	printf("score: %4.1f\n", s.score);

	return 0;
}

struct student max(struct student t1, struct student t2)
{
	if (t1.score > t2.score)
		return t1;
	else
		return t2;
}